From: Jasper St. Pierre Date: Tue, 6 Dec 2011 20:00:52 +0000 (-0500) Subject: browser-plugin: Fix memory leak when passing an invalid UUID X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7252 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=02af8eb824bde8cc21b58365772d67e0d6c5992f;p=gnome-shell.git browser-plugin: Fix memory leak when passing an invalid UUID https://bugzilla.gnome.org/show_bug.cgi?id=665261 --- diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c index fccb0616b..a80a4924f 100644 --- a/browser-plugin/browser-plugin.c +++ b/browser-plugin/browser-plugin.c @@ -480,7 +480,10 @@ plugin_install_extension (PluginObject *obj, { gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); if (!uuid_is_valid (uuid_str)) - return FALSE; + { + g_free (uuid_str); + return FALSE; + } g_dbus_proxy_call (obj->proxy, "InstallRemoteExtension", @@ -509,7 +512,10 @@ plugin_uninstall_extension (PluginObject *obj, uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); if (!uuid_is_valid (uuid_str)) - return FALSE; + { + g_free (uuid_str); + return FALSE; + } res = g_dbus_proxy_call_sync (obj->proxy, "UninstallExtension", @@ -543,7 +549,10 @@ plugin_get_info (PluginObject *obj, uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); if (!uuid_is_valid (uuid_str)) - return FALSE; + { + g_free (uuid_str); + return FALSE; + } res = g_dbus_proxy_call_sync (obj->proxy, "GetExtensionInfo", @@ -576,7 +585,10 @@ plugin_get_errors (PluginObject *obj, uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); if (!uuid_is_valid (uuid_str)) - return FALSE; + { + g_free (uuid_str); + return FALSE; + } res = g_dbus_proxy_call_sync (obj->proxy, "GetExtensionErrors",